//
//  DataManager.h
//  Rockval
//
//  Created by TuanNT on 4/27/14.
//  Copyright (c) 2014 TNL. All rights reserved.
//

#import "DataModels.h"

@interface DataManager : NSObject

/* The account that login to application */
@property (nonatomic, strong) Account *account;

/**
 * gets singleton object.
 * @return singleton
 */
+ (DataManager *)sharedInstance;

/* Login */
- (void)loginWithEmail:(NSString *)email
              password:(NSString *)password
              andBlock:(void (^)(BOOL isSuccess))block;

/* Near by */
- (void)saleNearByWithLatitute:(NSString *)lat
                    longtitute:(NSString *)longt
                      andBlock:(void (^)(NSArray *list))block;

- (void)leaseNearByWithLatitute:(NSString *)lat
                     longtitute:(NSString *)longt
                       andBlock:(void (^)(NSArray *list))block;


/* Watching list */
- (void)watchingListForSaleWithBlock:(void (^)(NSArray *list))block;
- (void)watchingListForLeaseWithBlock:(void (^)(NSArray *list))block;
- (void)addToWatchingListForItem:(NSString *)itemId andBlock:(void (^)(BOOL result))block;
- (void)removeFromWatchingListForItem:(NSString *)itemId andBlock:(void (^)(BOOL result))block;

/* Recent activity */
- (void)recentActivityForCustomerWithId:(NSString *)customerId block:(void (^)(NSArray *list))block;

/*get full list contries from plist file*/
+ (NSMutableDictionary*) getFullContries;
@end
